<?xml version="1.0" encoding="utf-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:com="http://java.sun.com/jsf/composite/componentes"
    xmlns:f="http://java.sun.com/jsf/core">
<ui:composition>
    <p:dialog
        id="modalCadastro"
        widgetVar="modalCadastro"
        modal="true"
        header="#{appMessages['condicoesClimaticas.cadastrar.titulo']}"
        dynamic="true"
        width="950"
        resizable="false">
        <h:form id="formCondicaoClimatica">
            <p:messages id="mensagens" globalOnly="true" />

            <p:fieldset legend="#{appMessages['condicoesClimaticas.cadastrar.dadosCondicoesClimaticas']}">
                <com:formInput
                    id="nome"
                    label="#{appMessages['condicoesClimaticas.cadastrar.nome']}">
                    <p:inputText
                        id="input"
                        label="#{appMessages['condicoesClimaticas.cadastrar.nome']}"
                        value="#{condicoesClimaticasBean.condicaoClimatica.nome}"
                        required="true" />
                </com:formInput>

                <p:toolbar>
                    <p:toolbarGroup>
                        <p:commandButton
                        	id="salvar"
                            value="#{messages['form.salvar']}"
                            update="@form :formCondicoesClimaticas:dtCondicoesClimaticas"
                            action="#{condicoesClimaticasBean.salvarCondicaoClimatica()}" />
                            
                        <p:commandButton
                        	id="cancelar"
                            value="#{messages['form.cancelar']}"
                            process="@this"
                            onclick="modalCadastro.hide();" />
                    </p:toolbarGroup>
                </p:toolbar>
            </p:fieldset>
        </h:form>
    </p:dialog>
</ui:composition>
</html>